var currentNum=1;
var keyword=null;
/**
 * 点击查找
 */
function search(){
    keyword=$("#nickname").val();

    $.ajax({
        url : "/friends/searchFriendJson",
        // 数据发送方式
        type : "get",
        // 接受数据格式
        dataType : "json",
        // 要传递的数据
        data : "nickname="+keyword+"&page="+1,
        success : function(result) {
            $("#content").html("");

            $(result.data).each(function () {
                $("#content").append(
                    ' <a href="/friends/searchFriendDetial?fid='+this.id+'" class="weui-media-box weui-media-box_appmsg">' +
                    '<div class="weui-media-box__hd">'+
                    '<img class="weui-media-box__thumb" src="'+this.headImage+'">' +
                    '</div>' +
                    '<div class="weui-media-box__bd">' +
                    '<h4 class="weui-media-box__title">'+this.nickname+'</h4>' +
                    '<p class="weui-media-box__desc">'+this.desction+'</p>' +
                    '</div>' +
                    '</a>'
                )
            });
        }
    });

}